<?php

require_once "core/application/models/msetparams/msetparams2.php";

class Msetparams3 extends Msetparams2 {

    private $_query;
    private $_fetch = array();

    protected function issetEmail($email) {
        /**
         *  проверяем, сущетсвует ли такой емайл
         */
        DB::getInstance()->openConnectionToLS();
        $this->_query = "SELECT `email` FROM `account_data`";
        $this->_fetch = mysql_fetch_assoc(DB::getInstance()->sql($this->_query));
        if ($this->_fetch['email'] == $email) {
            return true;
            DB::getInstance()->closeConnection();
            unset($this->_query, $this->_fetch);
        } else {
            return false;
            DB::getInstance()->closeConnection();
            unset($this->_query, $this->_fetch);
        }
    }

}

?>
